!function(){function e(t,n,r){function a(i,s){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!s&&c)return c(i,!0);if(o)return o(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[i]={exports:{}};t[i][0].call(f.exports,function(e){return a(t[i][1][e]||e)},f,f.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i0&&"behavior"===e.$a1[a-1].t){var o=t.behavior||[];e.$a1[a-1].behavior.concat(o)}else e.$a1.push(t)}else e.$a1.unshift(t);return e.$a2(function(){e.$a3=r.delay(function(){e.$a4()},e.$a1[0]&&"error"===e.$a1[0].t?3e3:-1)}),!0}n.times++}}(this,t)):this},_self:function(e,t,n){var a=this,i=a._conf;if("error"!==e)return a;if(!a.$ac(i.imgUrl))return a;if(!t||i.disabled||!i.pid)return a;if(n&&!a.$ai(n))return a;t=r.ext({t:e,times:1,page:r.selfErrPage,tag:i.pid,begin:Date.now()},t,{pid:o,_v:a.ver,sampling:n||1,z:r.seq()});var s=a.$a6[0];if(s){s.times++;try{if(s.err&&t.err&&s.err.msg_raw&&t.err.msg_raw){s.err.msg_raw.split("&").indexOf(t.err.msg_raw)<0&&s.err.msg_raw.length<1e3&&(s.err.msg_raw+="&"+t.err.msg_raw)}}catch(c){}}else a.$a6.unshift(t),a.$a2(function(){a.sdkFlag&&(a.sdkFlag=!1,a.$ak=r.delay(function(){a.$aj()},1e4))})},custom:function(e,t){if(!e||"object"!=typeof e)return this;var n=!1,a={begin:Date.now()};return r.each(e,function(e,t){return!(n=t&&t.length<=20)&&r.warn("[retcode] invalid key: "+t),a["x-"+t]=e,n}),n?this._lg("custom",a,t||1):this}},t.exports=i},{"./common/sendBeacon":12,"./util":16}],2:[function(e,t,n){var r=e("../util");t.exports=function(e,t){var n=[],a=null,o=t&&t.location&&t.location.href,i=0,s=undefined,c=null,u=function(e,t,n){if(null!==e){var r=e[t];e[t]=n(r)}},f=function(e){var t,n,r,a,o,i=[];if(!e||!e.tagName)return"";if(i.push(e.tagName.toLowerCase()),e.id&&"[object String]"===Object.prototype.toString.call(e.id)&&i.push("#".concat(e.id)),(t=e.className)&&"[object String]"===Object.prototype.toString.call(t))for(n=t.split(/\s+/),o=0;o"}if(0!==r.length){var o={type:"ui.".concat(e),data:{message:function(e){if(!e||1!==e.nodeType)return"";for(var t=e||null,n=[],r=0,a=0,o=" > ".length,i="";t&&r++<5&&!("html"===(i=f(t))||r>1&&a+n.length*o+i.length>=80);)n.push(i),a+=i.length,t=t.parentNode;return n.reverse().join(" > ")}(r)},timestamp:Date.now()};"click"===e?(i&&clearTimeout(i),t?i=setTimeout(function(){a&&a.addBehavior(o)},0):a&&a.addBehavior(o)):"keypress"===e&&(s||a&&a.addBehavior(o),clearTimeout(s),s=setTimeout(function(){s=undefined},100))}}}},p=function(){if(function(){var e=t&&t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}()){var e=function(e,t){var n={type:"navigation",data:{from:e,to:t}};a&&a.addBehavior(n),o=t},n=t.onpopstate;t.onpopstate=function(){for(var r=arguments.length,a=new Array(r),i=0;i2?r[2]:undefined;return i&&e(o,String(i)),t.apply(this,r)}};u(t.history,"pushState",r),u(t.history,"replaceState",r)}};r.ext(e.prototype,{addBehavior:function(e){if(this.getConfig("behavior")&&e&&"object"==typeof e){var a={},o=e.data||{};if(e.type)a=o;else{if("string"!=typeof o.name||"string"!=typeof o.message)return;a.name=o.name.substr(0,20),a.message=o.message.substr(0,200)}a.message&&(a.message=r.encode(a.message));var i={type:e.type||"custom",data:a||{},timestamp:e.timestamp||Date.now(),page:e.page||t&&t.location&&t.location.pathname};return n.push(i),n=n.slice(-100)}},getBehavior:function(){return n||[]},setBehavior:function(e){return e&&(n=e),n},reportBehavior:function(e){var t=this;t.getConfig("behavior")&&(t.$am&&(clearTimeout(t.$am),t.$am=undefined),t.$am=setTimeout(function(){n&&n.length>0&&(t.behavior(n),n=[],t.$am=undefined,e&&"function"==typeof e&&e())},0))},$an:function(){if(!this.hasInitBehavior&&!a){try{!function(){if(document&&document.referrer&&document.location){var e=document.referrer,t=document.location.href;if(""!==e){var n={type:"navigation",data:{from:e,to:t}};o=t,a&&a.addBehavior(n)}}}(),t&&t.document&&t.document.addEventListener&&(t.document.addEventListener("click",l("click"),!1),t.document.addEventListener("keypress",l("keypress"),!1)),p(),this.getConfig("enableConsole")&&function(){if(t&&t.console)for(var e=["debug","info","warn","log","error","assert"],n=0;n0?0:1,e.begin=Date.now();var t=e.begin-this.sBegin;e.stay=t,this._lg("health",e,1),this._health={errcount:0,apisucc:0,apifail:0}},createInstance:function(e){e=r.ext({pid:this._conf.pid},e);var t=this.__proto__.constructor(e);return e.page&&t.$az(),t}}),e("./behavior")(f,s),e("./handler")(f,s,c),e("./fmp")(f,s,c),e("./hook")(f,s),e("./hack")(f,s),f._super=a,f._root=a._root,a.Browser=f,t.exports=f},{"../common/post":10,"../common/sender":13,"../reporter":15,"../util":16,"./behavior":2,"./fmp":4,"./hack":5,"./handler":6,"./hook":7}],4:[function(e,t,n){var r=e("../util"),a=500;t.exports=function(e,t,n){function o(e,t,n){var r=0,a=e.tagName;if("SCRIPT"!==a&&"STYLE"!==a&&"META"!==a&&"HEAD"!==a){var i=e.children?e.children.length:0;if(i>0)for(var c=e.children,u=i-1;u>=0;u--)r+=o(c[u],t+1,r>0);if(r<=0&&!n){if(!(e.getBoundingClientRect&&e.getBoundingClientRect().topt||n-(c&&c.length&&c[c.length-1].t||0)>2*a)}(n._startTime,e)){u.disconnect(),f=0,c=i(c);for(var o=null,s=1;s=c[s-1].t){var l=c[s].score-c[s-1].score;(!o||o.rate<=l)&&(o={t:c[s].t,rate:l})}o&&o.t>0&&o.t<36e5?n.$b2({fmp:o.t}):n.$b2()}else r.delay(function(){n.$b3(e)},a)}})}},{"../util":16}],5:[function(e,t,n){t.exports=function(t,n){var r=e("../util"),a=n.history||{},o=n.document,i=function(e,t){var r;n.CustomEvent?r=new CustomEvent(e,{detail:t}):((r=o.createEvent("HTMLEvents")).initEvent(e,!1,!0),r.detail=t),n.dispatchEvent(r)},s=function(e){var t=a[e];"function"==typeof t&&(a[e]=function(n,o,s){var c=1===arguments.length?[arguments[0]]:Array.apply(null,arguments),u=location.href,f=t.apply(a,c);if(!s||"string"!=typeof s)return f;if(s===u)return f;try{var l=u.split("#"),p=s.split("#"),h=r.$av(l[0]),g=r.$av(p[0]),d=l[1]&&l[1].replace(/^\/?(.*)/,"$1"),v=p[1]&&p[1].replace(/^\/?(.*)/,"$1");h!==g?i("historystatechange",g):d!==v&&i("historystatechange",v)}catch(m){r.warn("[retcode] error in "+e+": "+m)}return f},a[e].toString=r.$b4(e))};r.ext(t.prototype,{$b5:function(){return this.$b6?this:(s("pushState"),s("replaceState"),this.$b6=!0,this)}})}},{"../util":16}],6:[function(e,t,n){t.exports=function(t,n,r){var a=e("../util"),o=e("../common/res"),i=e("../common/perf"),s=null,c=r.documentElement,u=n.innerWidth||c.clientWidth||r.body.clientWidth,f=n.innerHeight||c.clientHeight||r.body.clientHeight,l=n.navigator.connection,p={sr:screen.width+"x"+screen.height,vp:u+"x"+f,ct:l?l.effectiveType||l.type:""},h={},g=function(e,t,n,o,i){if(t===undefined){var s,c;if(!h[e]){s=new RegExp(e+"=([^;]+)");try{c=s.exec(r.cookie)}catch(f){return a.warn("[retcode] can not get cookie:",f),null}c&&(h[e]=c[1])}return h[e]}var u=e+"="+t;o&&(u+="; domain="+o),u+="; path="+(i||"/"),n&&(u+="; max-age="+n);try{return r.cookie=u,!!r.cookie}catch(f){return a.warn("[retcode] can not set cookie: ",f),!1}},d=function(e){var t=e._conf.uid||g("_nk_")||g("_bl_uid");if(!t){t=a.uu();if(!g("_bl_uid",t,15552e3))return null}return t};return a.ext(t.prototype,{activeErrHandler:function(e){return s&&!e?this:(s=this,this)},errorHandler:function(e){if(!e)return this;var t=e.type;if("error"===t){var n=e.target||e.srcElement;!(!n||!n.tagName||e.message||e.filename||e.lineno||e.colno)?this.$b7(e):this.error(e.error||{message:e.message},e)}else"unhandledrejection"===t&&a.T(e.reason,"Error")&&a.$b8(e.reason)&&this.error(e.reason);try{this.getConfig("behavior")&&this.reportBehavior&&this.reportBehavior()}catch(e){}return this},$b7:function(e){var t=this,n=e.target||e.srcElement;try{var r=t.$b9(n),o=n.tagName?n.tagName.toLowerCase():"",i=t.$ba(n,5);return t._lg("resourceError",{src:r&&r.substring(0,1e3),node_name:o,xpath:i}),t}catch(s){return a.warn("[ARMS] $b7 error :",s),t}},$b9:function(e){var t=e.src||e.href;try{if(!t){var n="object"===(e.tagName?e.tagName.toLowerCase():""),r=e.getAttribute("classid")&&"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"===e.getAttribute("classid").toLowerCase()||"application/x-shockwave-flash"===e.getAttribute("type");n&&r&&(t=e.getAttribute("data")||e.getAttribute("codebase")),t||(t=e.outerHTML||e.innerHTML)}}catch(a){t=""}return t},$ba:function(e,t){var n=e.id?"#"+e.id:"",r=e.className?"."+e.className.split(" ").join("."):"",a=(e.tagName?e.tagName.toLowerCase():"")+n+r;return e.parentNode&&e.parentNode.tagName&&t-1!=0?this.$ba(e.parentNode,t-1)+" > "+a:a},$b2:function(e){var t=this;t.$a2(function(){var n=i();n&&n.load&&n.load>0&&(n.page=t.$a8(!0),e&&(n=a.ext(n,e)),t.$bb&&(n=a.ext(n,t.$bb)),t.getConfig("autoSendPerf")?(n.autoSend=!0,t.performance(n)):t.$bb=n)})},$bc:function(e){var t=this;t.$a2(function(){var n=o();n&&n.load&&n.load>0&&(n.load&&n.load<=2e3||n.load&&n.load<=8e3&&Math.random()>.05||(n.page=t.$a8(!0),n.dl=location.href,e&&(n=a.ext(n,e)),t._lg("res",n,t.getConfig("sample"))))})},$az:function(){var e=this;e.$a2(function(){var t=function(e){var t=d(e),a=n.devicePixelRatio||1;return{uid:t,dt:r.title,dl:location.href,dr:r.referrer,dpr:a.toFixed(2),de:(r.characterSet||r.defaultCharset||"").toLowerCase(),ul:c.lang,begin:Date.now()}}(e);t&&t.uid&&e._lg("pv",t,e.getConfig("pvSample"))})},$ag:function(){return p.uid=d(this),p.sid=function(e){if(e.session)return e.session;var t;return sessionStorage&&"function"==typeof sessionStorage.getItem?"string"==typeof(t=sessionStorage.getItem("_bl_sid"))?(e.session=t,t):(t=a.uu(),e.session=t,"function"==typeof sessionStorage.setItem&&sessionStorage.setItem("_bl_sid",t),t):(e.session=t=a.uu(),t)}(this),p},$ay:function(e){var t=Date.now();if(t-this._lastUnload<200)return this;this._lastUnload=t,this.$b1(e),this.$bd&&(this._lg("speed",this.$bd),this.$bd=null,clearTimeout(this.$be)),this.$a4(!0)},$b0:function(e){var t=this;if(!e^t.$bf)return t;e?(t.$b5(),t.$bf=function(e){var n=t._conf.parseHash(location.hash);n&&t.setPage(n,!1!==e)},t.$bg=function(e){var n=t._conf.parseHash(e.detail);n&&t.setPage(n)},a.on(n,"hashchange",t.$bf),a.on(n,"historystatechange",t.$bg),t.$bf(!1)):(a.off(n,"hashchange",t.$bf),a.off(n,"historystatechange",t.$bg),t.$bf=null,t.$bg=null)},$ap:function(){var e=this;if(e.$bh)return e;var t=e._conf;return a.on(n,"beforeunload",function(){e.$ay(0)}),e.$b0(t.enableSPA),e.activeErrHandler(!1),e.$bh=!0,e}}),a.on(n,"error",function(e){s&&s.errorHandler(e)},!1,!0).on(n,"unhandledrejection",function(e){s&&s.errorHandler(e)}),t}},{"../common/perf":9,"../common/res":11,"../util":16}],7:[function(e,t,n){t.exports=function(t,n){var r=e("../util"),a=null,o=r.getCurDomain(),i=function(e,t,n,a,i,s,c,u,f,l){var p=r.J(i)||null,h=r.$a9(t,[p,a],null);if(!h)return!1;var g=h.code||s,d=!("success"in h)||h.success;e.api(n,d,c,g,h.msg,u,f,l,{},o)},s="fetch",c="__oFetch_",u="__oXMLHttpRequest_",f="XMLHttpRequest";return r.ext(t.prototype,{removeHook:function(e,t){return a&&(t||this===a)?(n[c]&&(n[s]=n[c],delete n[c]),n[u]&&(n[f]=n[u],delete n[u]),a=null,this):this},addHook:function(e){return!e&&a?this:(a||(function(){if("function"==typeof n[s]){var e=n[s];n[c]=e,n[s]=function(t,s){var c=1===arguments.length?[arguments[0]]:Array.apply(null,arguments),u=a;if(!u||!u.api)return e.apply(n,c);if(s&&("HEAD"===s.method||"no-cors"===s.mode))return e.apply(n,c);var f=Date.now(),l=u._conf,p=(t&&"string"!=typeof t?t.url:t)||"",h=p;if(p=r.$av(p),!r.$bi(p,!0))return e.apply(n,c);p=r.$au(p,l.ignoreApiPath?l.ignoreApiPath:l.apiHelper);var g=l.enableLinkTrace,d="",v="",m=u.getConfig("pid");if(g){var y="";try{y=location.origin?location.origin:location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")}catch(_){y=""}if(r.checkSameOrigin(h,y)){if(t&&"string"!=typeof t)try{if(c[0].headers&&"function"==typeof c[0].headers.get&&"function"==typeof c[0].headers.append){var b=c[0].headers.get("EagleEye-TraceID"),$=c[0].headers.get("EagleEye-SessionID"),w=c[0].headers.get("EagleEye-pAppName");b?d=b:(d=u.getTraceId()["EagleEye-TraceID"],c[0].headers.append("EagleEye-TraceID",d)),$?v=$:(v=u.getPageviewId()["EagleEye-SessionID"],c[0].headers.append("EagleEye-SessionID",v)),w||c[0].headers.append("EagleEye-pAppName",m)}}catch(E){r.warn("[retcode] fetch failed to set header, exception is :\n"+E)}s&&(s.headers=s.headers?s.headers:{},s.headers["EagleEye-TraceID"]?d=s.headers["EagleEye-TraceID"]:(d=u.getTraceId()["EagleEye-TraceID"],s.headers["EagleEye-TraceID"]=d),s.headers["EagleEye-SessionID"]?v=s.headers["EagleEye-SessionID"]:(v=u.getPageviewId()["EagleEye-SessionID"],s.headers["EagleEye-SessionID"]=v),s.headers["EagleEye-pAppName"]||(s.headers["EagleEye-pAppName"]=m))}}return e.apply(n,c).then(function(e){if(!u||!u.api)return e;try{if(!e||"function"!=typeof e.clone)return e;var t=e.clone(),n=t.headers;if(n&&"function"==typeof n.get){var a=n.get("content-type");if(a&&!/(text)|(json)/.test(a))return e}var s=Date.now()-f;return t.text().then(function(e){var a=r.getFetchSnapshot(c,e,n);t.ok?i(u,l.parseResponse,p,h,e,t.status||200,s,f,d,v):u.api(p,!1,s,t.status||404,t.statusText,f,d,v,a,o)}),e}catch(_){return r.warn("[ARMS] fetch response error :",_),e}})["catch"](function(e){if(!u||!u.api)throw e;var t=Date.now()-f;throw u.api(p,!1,t,e.name||"Error",e.message,f,d,v,{},o),e})},n[s].toString=r.$b4(s)}}(),function(){if("function"==typeof n[f]){var e,t=n[f];n[u]=t,n[f]=function(n){var s=new t(n),c=a;if(!c||!c.api||!s.addEventListener)return s;var u,f,l,p=s.send,h=s.open,g=s.setRequestHeader,d=c._conf,v=c.getConfig("enableLinkTrace"),m="",y="",b="";return s.open=function(t,n){e=t;var a=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);if(h.apply(s,a),l=n||"",f=r.$av(l),f=f?r.$au(f,d.ignoreApiPath?d.ignoreApiPath:d.apiHelper):"",v){var o="";try{o=location.origin?location.origin:location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")}catch(i){o=""}r.checkSameOrigin(l,o)&&g&&"function"==typeof g&&(m=c.getTraceId()["EagleEye-TraceID"],g.apply(s,["EagleEye-TraceID",m]),y=c.getPageviewId()["EagleEye-SessionID"],g.apply(s,["EagleEye-SessionID",y]),b=c.getConfig("pid"),g.apply(s,["EagleEye-pAppName",b]))}},s.send=function(){u=Date.now();var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);p.apply(s,e)},r.on(s,"readystatechange",function(){if(f&&4===s.readyState){var t=Date.now()-u,n=r.getXhrSnapshot(l,e,s);if(s.status>=200&&s.status<=299){var a=s.status||200;if("function"==typeof s.getResponseHeader){var p=s.getResponseHeader("Content-Type");if(p&&!/(text)|(json)/.test(p))return}s.responseType&&"text"!==s.responseType?c.api(f,!0,t,a,"",u,m,y,{},o):i(c,d.parseResponse,f,l,s.responseText,a,t,u,m,y)}else c.api(f,!1,t,s.status||"FAILED",s.statusText,u,m,y,n,o)}}),s},n[f].toString=r.$b4(f)}}()),a=this,this)},$aq:function(){return this.$bj?this:(this.getConfig("disableHook")||this.addHook(),this.$bj=!0,this)}}),t}},{"../util":16}],8:[function(e,t,n){n.TIMING_KEYS=["","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","requestStart","responseStart","responseEnd","","domInteractive","","domContentLoadedEventEnd","","loadEventStart","","msFirstPaint","secureConnectionStart"]},{}],9:[function(e,t,n){var r=e("../util"),a=e("./constants").TIMING_KEYS;t.exports=function(){var e=r.win||{},t=e.performance;if(!t||"object"!=typeof t)return null;var n={},o=t.timing||{},i=Date.now(),s=1;if("function"==typeof e.PerformanceNavigationTiming){var c=t.getEntriesByType("navigation")[0];c&&(o=c,s=2)}r.each({dns:[3,2],tcp:[5,4],ssl:[5,17],ttfb:[7,6],trans:[8,7],dom:[10,8],res:[14,12],firstbyte:[7,2],fpt:[8,1],tti:[10,1],ready:[12,1],load:[14,1]},function(e,t){var r=o[a[e[1]]],i=o[a[e[0]]];if(2===s||r>0&&i>0){var c=Math.round(i-r);c>=0&&c<6e5&&(n[t]=c)}});var u=e.navigator.connection,f=t.navigation||{};n.ct=u?u.effectiveType||u.type:"";var l=u?u.downlink||u.downlinkMax||u.bandwidth||null:null;if((l=l>999?999:l)&&(n.bandwidth=l),n.navtype=1===f.type?"Reload":"Other",1===s&&o[a[16]]>0&&o[a[1]]>0){var p=o[a[16]]-o[a[1]];p>=0&&p<36e5&&(n.fpt=p)}return 1===s&&o[a[1]]>0?n.begin=o[a[1]]:2===s&&n.load>0?n.begin=i-n.load:n.begin=i,n}},{"../util":16,"./constants":8}],10:[function(e,t,n){var r=e("../util"),a="object"==typeof window?window:{},o=a.__oXMLHttpRequest_||a.XMLHttpRequest;o="function"==typeof o?o:undefined,t.exports=function(e,t){try{var n=new o;n.open("POST",t,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(e))}catch(a){r.warn("[retcode] Failed to log, exception is :\n"+a)}}},{"../util":16}],11:[function(e,t,n){var r=e("../util"),a=e("./constants").TIMING_KEYS;t.exports=function(){var e=r.win||{},t=e.performance;if(!t||"object"!=typeof t||"function"!=typeof t.getEntriesByType)return null;var n={},o=t.timing||{},i=t.getEntriesByType("resource")||[];if(n.begin=o[a[1]]||Date.now(),"function"==typeof e.PerformanceNavigationTiming){var s=t.getEntriesByType("navigation")[0];s&&(o=s)}return r.each({dom:[10,8],load:[14,1]},function(e,t){var r=o[a[e[1]]],i=o[a[e[0]]];if(r>0&&i>0){var s=Math.round(i-r);s>=0&&s<6e5&&(n[t]=s)}}),n.res=JSON.stringify(i),n}},{"../util":16,"./constants":8}],12:[function(e,t,n){var r=e("../util");t.exports=function(e,t){"object"==typeof e&&(e=r.serialize(e));var n=t+e;window&&window.navigator&&"function"==typeof window.navigator.sendBeacon?window.navigator.sendBeacon(n,"&post_res="):r.warn("[arms] navigator.sendBeacon not surported")}},{"../util":16}],13:[function(e,t,n){var r=e("../util"),a="object"==typeof window?window:{},o=a.__oFetch_||a.fetch;o="function"==typeof o?o:undefined,t.exports=function(e,t){var n=-1;"object"==typeof e&&(n=e.z,e=r.serialize(e));var i=t+e;if(o)return o(i,{method:"HEAD",mode:"no-cors"})["catch"](r.noop);if(a.document&&a.document.createElement){var s="__request_hold_"+n,c=a[s]=new Image;c.onload=c.onerror=function(){a[s]=undefined},c.src=i,c=null}}},{"../util":16}],14:[function(e,t,n){"use strict";function r(e,t){var n=a[i]=new o(e);n.$as(t);var r=n._conf;return!1!==r.autoSendPv&&n.$az(),r&&r.useFmp||n.$b2(),r&&r.sendResource&&n.$bc(),a[s]=!0,n}var a=window,o=a.BrowserLogger=e("./biz.browser/clazz"),i=e("./util").key,s="__hasInitBlSdk";o.singleton=function(e,t){return a[s]?a[i]:r(e,t)},o.createExtraInstance=function(e){e&&"object"==typeof e&&!0!==e.enableInstanceAutoSend&&(e.enableInstanceAutoSend=!1);var t=new o(e),n=t._conf;return n.enableInstanceAutoSend&&(!1!==n.autoSendPv&&t.$az(),n&&n.useFmp||t.$b2(),n&&n.sendResource&&t.$bc()),t};"object"==typeof window&&!!window.navigator&&a[i]&&(o.bl=function(){if(a[s])return a[i];var e={},t=[];return i in a&&(e=a[i].config||{},t=a[i].pipe||[]),r(e,t)}(a.__hasInitBlSdk)),t.exports=o},{"./biz.browser/clazz":3,"./util":16}],15:[function(e,t,n){var r=e("./util"),a=e("./base"),o=["api","success","time","code","msg","trace","traceId","begin","pv_id","sid","seq","domain"],i=function(e,t){var n=e.split("::");return n.length>1?r.ext({group:n[0],key:n[1]},t):r.ext({group:"default_group",key:n[0]},t)},s=function(e){a.call(this,e);var t;try{t="object"==typeof performance?performance.timing.fetchStart:Date.now()}catch(n){t=Date.now()}return this._startTime=t,this};s.prototype=r.$at(a.prototype),r.ext(a.dftCon,{startTime:null}),r.ext(s.prototype,{constructor:s,_super:a,sum:function(e,t,n){try{return this._lg("sum",i(e,{val:t||1,begin:Date.now()}),n)}catch(a){r.warn("[retcode] can not get parseStatData: "+a)}},avg:function(e,t,n){try{return this._lg("avg",i(e,{val:t||0,begin:Date.now()}),n)}catch(a){r.warn("[retcode] can not get parseStatData: "+a)}},percent:function(e,t,n,a){try{return this._lg("percent",i(e,{subkey:t,val:n||0,begin:Date.now()}),a)}catch(o){r.warn("[retcode] can not get parseStatData: "+o)}},msg:function(e,t){if(e&&!(e.length>180))return this.custom({msg:e},t)},error:function(e,t){if(!e)return r.warn("[retcode] invalid param e: "+e),this;1===arguments.length?("string"==typeof e&&(e={message:e},t={}),"object"==typeof e&&(t=e=e.error||e)):("string"==typeof e&&(e={message:e}),"object"!=typeof t&&(t={}));var n=e.name||"CustomError",a=e.message||"",o=e.stack||"";t=t||{};if(r.$bk(a,t.filename)){var i={msg:r.selfErrKey,err:{msg_raw:r.encode(e.msg||e.message)}};return this._self("error",i,1)}var s={begin:Date.now(),cate:n,msg:a&&a.substring(0,1e3),stack:o&&o.substring(0,1e3),file:r.$bl(t.filename||""),line:t.lineno||"",col:t.colno||"",err:{msg_raw:r.encode(a),stack_raw:r.encode(o)}},c=(this.getConfig("ignore")||{}).ignoreErrors;return r.$al(s.msg,c)||r.$al(r.decode(s.msg),c)?this:(this.$ao&&this.$ao("error",s),this._lg("error",s,1))},behavior:function(e){if(e){var t="object"==typeof e&&e.behavior?e:{behavior:e};return this.$ao&&this.$ao("behavior",t),this._lg("behavior",t,1)}},api:function(e,t,n,a,i,s,c,u,f,l){if(!e)return r.warn("[retcode] api is null"),this;if(e="string"==typeof e?{api:e,success:t,time:n,code:a,msg:i,begin:s,traceId:c,pv_id:u,domain:l}:r.sub(e,o),!r.$bi(e.api,!0))return this;if(e.code=e.code||"",e.msg=e.msg||"",e.success=e.success?1:0,e.time=+e.time,e.begin=e.begin,e.traceId=e.traceId||"",e.pv_id=e.pv_id||"",e.domain=e.domain||"",e.success?e.apiSnapshot&&delete e.apiSnapshot:e.apiSnapshot=f,!e.api||isNaN(e.time))return r.warn("[retcode] invalid time or api"),this;var p=(this.getConfig("ignore")||{}).ignoreApis;return r.$al(e.api,p)||r.$al(r.decode(e.api),p)?this:(this.$ao&&this.$ao("api",e),this._lg("api",e,e.success&&this.getConfig("sample")))},speed:function(e,t,n){var a=this,o=this.getConfig("startTime")||this._startTime;return/^s(\d|1[0])$/.test(e)?(t="number"!=typeof t?Date.now()-o:t>=o?t-o:t,a.$bd=a.$bd||{},a.$bd[e]=t,a.$bd.begin=o,clearTimeout(a.$be),a.$be=setTimeout(function(){n||(a.$bd.page=a.$a8(!0)),a._lg("speed",a.$bd),a.$bd=null},5e3),a):(r.warn("[retcode] invalid point: "+e),a)},performance:function(e){if(e&&"object"==typeof e){var t={},n=this.getConfig("autoSendPerf");if(n&&e.autoSend&&!this.$bm)return this.$bm=!0,this._lg("perf",e,this.getConfig("sample"));for(var a in e)(/^t([1-9]|1[0])$/.test(a)||"ctti"===a||"cfpt"===a)&&(t[a]=e[a]);if(n&&!0!==e.autoSend)this.$bb=r.ext(this.$bb||{},t);else if(!1===n&&!this.$bm){if(!this.$bb||"object"!=typeof this.$bb)return;return t=r.ext(this.$bb,t),this.$bm=!0,this._lg("perf",t,this.getConfig("sample"))}}},resource:function(e,t){if(!e||!r.isPlainObject(e))return r.warn("[arms] invalid param data: "+e),this;var n=Object.keys(e),a=["begin","dom","load","res","dl"],o=!1;for(var i in a){if(n.indexOf(a[i])<0){o=!0;break}}if(o)return r.warn("[arms] lack param data: "+e),this;var s={begin:e.begin||Date.now(),dom:e.dom||"",load:e.load||"",res:r.isArray(e.res)?JSON.stringify(e.res):JSON.stringify([]),dl:e.dl||""};return this._lg("res",s,t)}}),s._super=a,s._root=a,a.Reporter=s,t.exports=s},{"./base":1,"./util":16}],16:[function(e,t,n){Date.now=Date.now||function(){return(new Date).getTime()};var r=Date.now(),a=function(){},o={noop:a,warn:function(){var e="object"==typeof console?console.warn:a;try{var t={warn:e};t.warn.call(t)}catch(n){return a}return e}(),key:"__bl",selfErrKey:"ARMS_SDK_ERROR",selfErrPage:"ARMSSDK",win:"object"==typeof window&&window.document?window:undefined,regionMap:{cn:"https://arms-retcode.aliyuncs.com/r.png?",sg:"https://arms-retcode-sg.aliyuncs.com/r.png?",sg_2:"https://retcode-sg-lazada.arms.aliyuncs.com/r.png?",daily:"http://arms-retcode-daily.alibaba.net/r.png?",daily_2:"https://arms-retcode-daily.alibaba.net/r.png?",us:"https://retcode-us-west-1.arms.aliyuncs.com/r.png?"},defaultImgUrl:"https://arms-retcode.aliyuncs.com/r.png?",$at:function(e){if(Object.create)return Object.create(e);var t=function(){};return t.prototype=e,new t},each:function(e,t){var n=0,r=e.length;if(this.T(e,"Array"))for(;nn&&(n=parseInt(1/n)),n>=1&&n<=100?e.sample=n:delete e.sample}return e},on:function(e,t,n,r,a){return e.addEventListener?(a=a||!1,e.addEventListener(t,function o(i){r&&e.removeEventListener(t,o,a),n.call(this,i)},a)):e.attachEvent&&e.attachEvent("on"+t,function i(a){r&&e.detachEvent("on"+t,i),n.call(this,a)}),this},off:function(e,t,n){return n?(e.removeEventListener?e.removeEventListener(t,n):e.detachEvent&&e.detachEvent(t,n),this):this},delay:function(e,t){return-1===t?(e(),null):setTimeout(e,t||0)},ext:function(e){for(var t=1,n=arguments.length;t0;)t=(e=36*Math.random()|0).toString(36),r[n]=e%3?t:t.toUpperCase();for(var o=0;o<8;o++)r.splice(3*o+2,0,a[o]);return r.join("")},seq:function(){return(r++).toString(36)},decode:function(e){try{e=decodeURIComponent(e)}catch(t){}return e},encode:function(e,t){try{e=t?encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29"):encodeURIComponent(e)}catch(n){}return e},serialize:function(e){e=e||{};var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==undefined&&t.push(n+"="+this.encode(e[n],"msg"===n));return t.join("&")},$bi:function(e,t){if(!e||"string"!=typeof e)return!1;var n=/arms-retcode[\w-]*\.aliyuncs/.test(e);return!n&&t&&(n=/(\.png)|(\.gif)|(alicdn\.com)/.test(e)),!n},$b8:function(e){return!(!e||!e.message)&&!/failed[\w\s]+fetch/i.test(e.message)},$av:function(e){return e&&"string"==typeof e?e.replace(/^(https?:)?\/\//,"").replace(/\?.*$/,""):""},$bl:function(e){return e&&"string"==typeof e?e.replace(/\?.*$/,""):""},$b4:function(e){return function(){return e+"() { [native code] }"}},checkSameOrigin:function(e,t){if(!t||!e)return!1;var n="//"+t.split("/")[2];return e===t||e.slice(0,t.length+1)===t+"/"||e===n||e.slice(0,n.length+1)===n+"/"||!/^(\/\/|http:|https:).*/.test(e)},getRandIP:function(){for(var e=[],t=0;t<4;t++){var n=Math.floor(256*Math.random());e[t]=(n>15?"":"0")+n.toString(16)}return e.join("")},getSortNum:function(e){return e?(e+=1)>=1e3&&e<=9999?e:e<1e3?e+1e3:e%1e4+1e3:1e3},getRandNum:function(e){return e&&"string"==typeof e?e.length<5?this.getNum(5):e.substring(e.length-5):this.getNum(5)},getNum:function(e){for(var t=[],n=0;n=0&&(o=e.substring(e.indexOf("?")+1,e.length).split("&")),o.length>0)for(var i in o)r=(n=o[i].split("="))[0],a=n[1],t[r]=a}catch(s){t={}}return t},getFetchSnapshot:function(e,t,n){var r,a;try{var o=(e&&"string"!=typeof e[0]?e[0].url:e[0])||"",i=(e&&"string"!=typeof e[0]?e[0]:e[1])||{},s="POST"===i.method.toUpperCase()?i.body:this.getQuerys(o);r={originApi:o,method:i.method||"unknown",params:s,response:t||"",reqHeaders:this.parseFetchHeaders(i.headers||null),resHeaders:this.parseFetchHeaders(n)},a="function"==typeof encodeURIComponent&&JSON&&encodeURIComponent(JSON.stringify(r))||"{}"}catch(c){a="{}"}return a},getXhrSnapshot:function(e,t,n){if(!e||!t||!n)return{};var r,a;try{r={originApi:e,method:t,params:this.getQuerys(e),response:n.responseText||n.responseXml||"",reqHeaders:{},resHeaders:this.parseXhrHeaders("function"==typeof n.getAllResponseHeaders&&n.getAllResponseHeaders()||"")},a="function"==typeof encodeURIComponent&&JSON&&encodeURIComponent(JSON.stringify(r))||"{}"}catch(o){a="{}"}return a},isRobot:function(){var e=["nuhk","googlebot/","googlebot-image","yammybot","openbot","slurp","msnbot","ask jeeves/teoma","ia_archiver","baiduspider","bingbot/","adsbot"];if(!navigator||"string"!=typeof navigator.userAgent)return!1;try{for(var t=navigator.userAgent.toLowerCase(),n=0;n=0)return!0}}catch(a){o.warn("[arms] useragent parse error")}return!1},isFunction:function(e){return"function"==typeof e},isPlainObject:function(e){return"[object Object]"===Object.prototype.toString.call(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},joinRegExp:function(e){for(var t,n=[],r=0,a=e.length;r